﻿/****************************************************
	文件：Singleton.cs
	作者：HuskyT
	邮箱:  1005240602@qq.com
	日期：2020/04/23 23:01   	
	功能：单例模板
*****************************************************/

public class Singleton<T> where T : new()
{
    private static T ms_instance;

    public static T Instance
    {
        get
        {
            if (ms_instance == null)
            {
                ms_instance = new T();
            }

            return ms_instance;
        }
    }
}